export * from './tag'
export * from './taskType'

// 标签
export interface TaskTag {
  id: string
  name: string
  attributeList?: Attribute[]
  number?: number
  taskId?: number
  color?: string
  updateTime?: string
  createTime?: string
  addEdit?: boolean
}

export interface DmpLabelProps {
  // 标签id
  id?: string
  // 数据标注id（标注唯一性）
  onlyId?: string
  // 标题
  title?: string
  // 色值
  color?: string
  // 高度
  height?: string
  // 是否显示删除按钮
  showRemoveButton?: boolean
  // 数据
  data?: any
  // 圆角
  borderRadius?: string
  // 是否显示下拉框
  showDropdown?: boolean
  // 最大宽度
  maxWidth?: string
}

export interface Attribute {
  id: string
  name: string
  value: string
}

// 任务图片项
export interface TaskDataLi {
  /**
   * 数据桶名
   */
  bucketName: string
  createTime: string
  /**
   * 图片名字
   */
  fileName: string
  /**
   * 文件访问url
   */
  fileUrl: string
  pathUrl: string
  id: string
  /**
   * 标注信息
   */
  markInfoList: MarkInfo[]
  /**
   * 标注类型
   */
  markType: number
  /**
   * 图片路径
   */
  originalImgUrl: string
  /**
   * 任务id
   */
  taskId: number
  updateTime: string
}
export interface MarkInfo {
  childList: MarkInfoChildList[]
  color: null | string
  name: null | string
  originalImgUrl: string
  pid: number
  region: null | string
  taskBucketDataId: string
  taskTagAttributeId: null
  taskTagId: null | string
  uid: string
  id: string
  value: null
}
interface MarkInfoChildList {
  childList: ChildListChildList[] | null
  color: null | string
  name: string
  originalImgUrl: null | string
  pid: number
  region: null
  taskBucketDataId: string
  taskTagAttributeId: null | string
  taskTagId: null | string
  uid: number
  value: null | string
}
interface ChildListChildList {
  childList: null
  color: null
  name: string
  originalImgUrl: null
  pid: number
  region: null
  taskBucketDataId: string
  taskTagAttributeId: string
  taskTagId: null
  uid: number
  value: string
}

// 任务基本信息
export interface TaskInfo {
  name: string
  taskBucketList: []
  progress: string
  description: string
  createTime: string
  [key: string]: any
}

export interface MarkObj extends fabric.Object {
  markTagInfo?: any
  direction?: string
  tlCoordXy?: any[]
  [x: string]: any
}

// 标注任务数据
export interface DmpTask {
  createTime: string
  description: string
  hasMarkCount: number
  id: string
  name: string
  totalCount: number
  updateTime: string
}
